package main

import "strings"

func main() {

}

//#link: https://leetcode-cn.com/problems/length-of-last-word/
func lengthOfLastWord(s string) (ans int) {
	strArry := strings.Split(s, " ")
	for i := len(strArry) - 1; i >= 0; i-- {
		if strArry[i] != "" {
			return len(strArry[i])
		}
	}
	return len(strArry[len(strArry)-1])
}
